import { $post } from '@js/request'
// 获取身份证信息
export async function getCardInfoRequest (url, type) {
  const config = {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  }
  const formData = new FormData()
  formData.append('file_url', url)
  formData.append('side', type === '正面' ? 'face' : 'back')
  const res = await $post('/api/common/card_ocr', formData, config)
  return res.data
}